package cn.suxiaoxiang.suwebverify.util;

/**
 * IP工具类，统一IPv4和IPv6本地回环地址
 */
public class IpUtil {
    /**
     * 规范化IP地址，将IPv6本地回环转为127.0.0.1
     */
    public static String normalizeIp(String ip) {
        if (ip == null) return "";
        if (ip.equals("0:0:0:0:0:0:0:1") || ip.equals("::1")) return "127.0.0.1";
        return ip;
    }
} 